% To calculate booking limit 
%{
%**************POISSON DISTRIBUTION*******************

% cases vary for various values of Arrival Rate, rates
% Assume (Lower category price,Higher Category Price($ per hour)
% =(1,4),(2,6),(5,20),(10,25),(20,50),(50,150)
% Arrival Rate=5,10,25,50,100,150,250,400,500,800,1000
% arr_rate =[5 10 25 50 100 150 250 400 500 800 1000 ];
fprintf('i\t Poisson CDF\n');
for i = 0:499
    probability = poisscdf(i,5);
   fprintf('%.0f\t\t %.3f\n',i,probability); 
end

%*****************************************************
%}



%%{
%**************BINOMIAL DISTRIBUTION*******************

% cases vary for various values of Arrival Rate, rates
% Assume (Lower category price,Higher Category Price($ per hour)
% =(1,4),(2,6),(5,20),(10,25),(20,50),(50,150)
% Arrival Rate=5,10,25,50,100,150,250,400,500,800,1000
 for j=0.1:0.1:0.9
    for i = 0:499
        probability =  binocdf(i,500,j);
        fprintf('%.0f\t %.2f \t %.3f \n', i,j,probability);
    end
    fprintf('\n');
 end 
%*****************************************************

%%}

